----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  D:\Vicard\VV\re\inprogress\BRV\results\predictions_exit_fe.log
  log type:  text
 opened on:  29 Sep 2017, 20:04:09

. 
. use "$Output\balanced_export_fe", replace

. *
. foreach ele in "ele1"{ 
  2. *g lvalue_l1            = log(value_l1)
. g age_`ele'_shock       = diff_jkt*age_`ele'
  3. g age_`ele'_res_fe_qty  = res_fe_qty*age_`ele'
  4. 
. /* Prediction 1: Probability of exit decreases with prior for a given age */
. eststo: reghdfe exit_f1 res_fe_qty age_`ele'                                                                                            , absorb(ikt jkt) vce(cluster ijk)  
  5. /* Prediction 2: Probability of exit decreases whith shock given age */
. eststo: reghdfe exit_f1                          diff_jkt age_`ele'                                                             , absorb(ikt jkt) vce(cluster ijk) 
  6. eststo: reghdfe exit_f1 res_fe_qty diff_jkt age_`ele'                                                                   , absorb(ikt jkt) vce(cluster ijk) 
  7. /* Prediction 3: negative shock leads to more exit in younger cohorts */
. *eststo: reghdfe exit_f1                         age_`ele'_shock diff_jkt age_`ele'                             , absorb(ikt jkt) vce(cluster ijk) 
. *eststo: reghdfe exit_f1 res_fe_qty age_`ele'_shock diff_jkt age_`ele'                                  , absorb(ikt jkt) vce(cluster ijk)  
. eststo: reghdfe exit_f1 res_fe_qty age_`ele'_shock diff_jkt age_`ele'   age_`ele'_res_fe_qty    , absorb(ikt jkt) vce(cluster ijk)  
  8. *
. label var res_fe_qty            "Prior$_{ijkt-1}$"
  9. label var age_`ele'             "Age$_{ijkt}$" 
 10. label var age_`ele'_shock   "$\widehat{v}\times$Age$_{ijkt}$"
 11. *
. }
(2,642 missing values generated)
(dropped 228099 singleton observations)
(converged in 52 iterations)

HDFE Linear regression                            Number of obs   =  4,885,284
Absorbing 2 HDFE groups                           F(   2,1278993) =   87208.13
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.5502
                                                  Adj R-squared   =     0.3669
                                                  Within R-sq.    =     0.0642
Number of clusters (ijk)     =  1,278,994         Root MSE        =     0.3418

                            (Std. Err. adjusted for 1,278,994 clusters in ijk)
------------------------------------------------------------------------------
             |               Robust
     exit_f1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  res_fe_qty |  -.0428421    .000143  -299.66   0.000    -.0431223   -.0425619
    age_ele1 |  -.0236079   .0001209  -195.34   0.000    -.0238447    -.023371
------------------------------------------------------------------------------

Absorbed degrees of freedom:
---------------------------------------------------------------+
 Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
-------------+-------------------------------------------------|
         ikt |       858621          858621              0     | 
         jkt |       555901          580157          24256     | 
---------------------------------------------------------------+
(est1 stored)
(dropped 227830 singleton observations)
(converged in 53 iterations)

HDFE Linear regression                            Number of obs   =  4,883,147
Absorbing 2 HDFE groups                           F(   2,1278363) =   70880.90
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.5446
                                                  Adj R-squared   =     0.3590
                                                  Within R-sq.    =     0.0526
Number of clusters (ijk)     =  1,278,364         Root MSE        =     0.3439

                            (Std. Err. adjusted for 1,278,364 clusters in ijk)
------------------------------------------------------------------------------
             |               Robust
     exit_f1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    diff_jkt |   .0332041   .0001412   235.14   0.000     .0329273    .0334809
    age_ele1 |  -.0275952   .0001197  -230.52   0.000    -.0278298   -.0273606
------------------------------------------------------------------------------

Absorbed degrees of freedom:
---------------------------------------------------------------+
 Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
-------------+-------------------------------------------------|
         ikt |       858026          858026              0     | 
         jkt |       555529          579694          24165     | 
---------------------------------------------------------------+
(est2 stored)
(dropped 227830 singleton observations)
(converged in 53 iterations)

HDFE Linear regression                            Number of obs   =  4,883,147
Absorbing 2 HDFE groups                           F(   3,1278363) =   61309.60
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.5521
                                                  Adj R-squared   =     0.3696
                                                  Within R-sq.    =     0.0681
Number of clusters (ijk)     =  1,278,364         Root MSE        =     0.3411

                            (Std. Err. adjusted for 1,278,364 clusters in ijk)
------------------------------------------------------------------------------
             |               Robust
     exit_f1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  res_fe_qty |  -.0798442   .0003862  -206.74   0.000    -.0806012   -.0790872
    diff_jkt |    -.03868   .0003769  -102.63   0.000    -.0394187   -.0379412
    age_ele1 |  -.0222324   .0001213  -183.26   0.000    -.0224701   -.0219946
------------------------------------------------------------------------------

Absorbed degrees of freedom:
---------------------------------------------------------------+
 Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
-------------+-------------------------------------------------|
         ikt |       858026          858026              0     | 
         jkt |       555529          579694          24165     | 
---------------------------------------------------------------+
(est3 stored)
(dropped 227830 singleton observations)
(converged in 53 iterations)

HDFE Linear regression                            Number of obs   =  4,883,147
Absorbing 2 HDFE groups                           F(   5,1278363) =   37964.07
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.5526
                                                  Adj R-squared   =     0.3703
                                                  Within R-sq.    =     0.0692
Number of clusters (ijk)     =  1,278,364         Root MSE        =     0.3409

                                   (Std. Err. adjusted for 1,278,364 clusters in ijk)
-------------------------------------------------------------------------------------
                    |               Robust
            exit_f1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------------+----------------------------------------------------------------
         res_fe_qty |  -.1021202   .0006723  -151.89   0.000     -.103438   -.1008025
     age_ele1_shock |   .0032065   .0001465    21.88   0.000     .0029193    .0034937
           diff_jkt |  -.0506775   .0006562   -77.23   0.000    -.0519636   -.0493915
           age_ele1 |  -.0223558   .0001206  -185.37   0.000    -.0225922   -.0221194
age_ele1_res_fe_qty |   .0059804    .000146    40.96   0.000     .0056943    .0062666
-------------------------------------------------------------------------------------

Absorbed degrees of freedom:
----------------------------------------------------------------------+
        Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
--------------------+-------------------------------------------------|
                ikt |       858026          858026              0     | 
                jkt |       555529          579694          24165     | 
----------------------------------------------------------------------+
(est4 stored)

. set linesize 250

. esttab, mtitles  b(%5.3f) se(%5.3f) compress r2 starlevels(c 0.1 b 0.05 a 0.01)  se 

------------------------------------------------------
                 (1)        (2)        (3)        (4) 
                est1       est2       est3       est4 
------------------------------------------------------
res_fe_qty    -0.043a               -0.080a    -0.102a
             (0.000)               (0.000)    (0.001) 

age_ele1      -0.024a    -0.028a    -0.022a    -0.022a
             (0.000)    (0.000)    (0.000)    (0.000) 

diff_jkt                  0.033a    -0.039a    -0.051a
                        (0.000)    (0.000)    (0.001) 

age_ele1~k                                      0.003a
                                              (0.000) 

age_ele1~y                                      0.006a
                                              (0.000) 
------------------------------------------------------
N            4885284    4883147    4883147    4883147 
R-sq           0.550      0.545      0.552      0.553 
------------------------------------------------------
Standard errors in parentheses
c p<0.1, b p<0.05, a p<0.01

. esttab, mtitles  b(%5.3f) se(%5.3f) r2  starlevels({$^c$} 0.1 {$^b$} 0.05 {$^a$} 0.01) se tex label  title() 

{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\begin{tabular}{l*{4}{c}}
\hline\hline
                    &\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}&\multicolumn{1}{c}{(3)}&\multicolumn{1}{c}{(4)}\\
                    &\multicolumn{1}{c}{est1}&\multicolumn{1}{c}{est2}&\multicolumn{1}{c}{est3}&\multicolumn{1}{c}{est4}\\
\hline
Prior{ijkt-1}$      &      -0.043{$^a$}&                  &      -0.080{$^a$}&      -0.102{$^a$}\\
                    &     (0.000)      &                  &     (0.000)      &     (0.001)      \\
[1em]
Age{ijkt}$          &      -0.024{$^a$}&      -0.028{$^a$}&      -0.022{$^a$}&      -0.022{$^a$}\\
                    &     (0.000)      &     (0.000)      &     (0.000)      &     (0.000)      \\
[1em]
shock\_trim - prior in t-1&                  &       0.033{$^a$}&      -0.039{$^a$}&      -0.051{$^a$}\\
                    &                  &     (0.000)      &     (0.000)      &     (0.001)      \\
[1em]
$\widehat{v}\times{ijkt}$&                  &                  &                  &       0.003{$^a$}\\
                    &                  &                  &                  &     (0.000)      \\
[1em]
age\_ele1\_res\_fe\_qty &                  &                  &                  &       0.006{$^a$}\\
                    &                  &                  &                  &     (0.000)      \\
\hline
Observations        &     4885284      &     4883147      &     4883147      &     4883147      \\
\(R^{2}\)           &       0.550      &       0.545      &       0.552      &       0.553      \\
\hline\hline
\multicolumn{5}{l}{\footnotesize Standard errors in parentheses}\\
\multicolumn{5}{l}{\footnotesize {$^c$} p<0.1, {$^b$} p<0.05, {$^a$} p<0.01}\\
\end{tabular}
}

. eststo clear

. 
. 
. log close
      name:  <unnamed>
       log:  D:\Vicard\VV\re\inprogress\BRV\results\predictions_exit_fe.log
  log type:  text
 closed on:  29 Sep 2017, 20:32:24
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
